<template>
    <div class="login_container">
        <!-- 登陆表单 -->
        <div class="login_form">
            <h3 class="title">稻草快速开发平台</h3>
            <el-form :model="loginForm">
                <el-form-item>
                    <el-input v-model="loginForm.account" placeholder="请输入账号">
                        <template #prefix>
                            <el-icon class="el-input__icon">
                                <UserFilled />
                            </el-icon>
                        </template>
                    </el-input>
                </el-form-item>
                <el-form-item>
                    <el-input v-model="loginForm.password" type="password" placeholder="请输入密码">
                        <template #prefix>
                            <el-icon class="el-input__icon">
                                <Lock />
                            </el-icon>
                        </template>
                    </el-input>
                </el-form-item>
                <div class="rememberMe">
                    <el-checkbox v-model="loginForm.rememberMe" label="记住我" size="large"></el-checkbox>
                    <el-text class="forget mx-1" type="primary">忘记密码?</el-text>
                </div>
                <el-divider>其他登录方式</el-divider>
                <div class="other-login">
                    <el-icon class="other-login-item">
                        <ChromeFilled />
                    </el-icon>
                    <el-icon class="other-login-item">
                        <Eleme />
                    </el-icon>
                    <el-icon class="other-login-item">
                        <ElementPlus />
                    </el-icon>
                </div>
                <el-form-item>
                    <el-button style="width: 100%;" type="primary">登录</el-button>
                </el-form-item>
            </el-form>
        </div>
    </div>
</template>

<script setup>
import { ref } from 'vue'

const loginForm = ref({
    account: undefined,
    password: undefined,
    rememberMe: undefined,
})

</script>

<style lang="scss" scoped>
.login_container {
    background-image: url('../assets/bgimg/1.jpg');
    background-size: 100%;
    height: 100vh;
    display: flex;
    justify-content: flex-end;

    .login_form {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        width: 50%;
        background-color: #fff;

        .title {
            margin-bottom: 20px;
        }
        .rememberMe{
            display: flex;
            justify-content: space-between;
            align-items: center;
            .forget{
                cursor: pointer;
            }
        }
        .other-login{
            display: flex;
            justify-content: center;
            margin-bottom: 20px;
            .other-login-item{
                margin-right: 60px;
                cursor: pointer;
            }
        }
    }
}

.el-form {
    width: 60%;
}

.el-form-item {
    width: 100%;
}
</style>